//
//  UserSettingProfileModifyController.m
//  SmallElephant
//
//  Created by Faith on 2022/12/24.
//

#import "UserSettingProfileModifyController.h"

@interface UserSettingProfileModifyController ()

/// 内容视图
@property (nonatomic, strong) UIView *contentView;

@end

@implementation UserSettingProfileModifyController

- (void)viewDidLoad {
    [super viewDidLoad];
    // 设置标题
    [self setTitleText:[self.type isEqualToString:@"1"] ? @"设置昵称" : @"设置个性签名"];
    // 设置
    [self.scrollViewContent addSubview:self.contentView style:@"display: flex; flex-direction: column; border-radius: 10px; background: #FFFFFF; margin-left: 10px; margin-right: 10px; margin-top: 20px; padding-top: 5px; padding-bottom: 5px;"];
    // 加载数据
    [self loadData];
}


/// 懒加载个人资料
- (UIView *)contentView {
    if(!_contentView) {
        _contentView = [[UIView alloc] init];
        
        UIView *itemView = [[UIView alloc] init];
        [_contentView addSubview:itemView style:@"display: flex; flex-direction: row; justify-content: space-between; padding-left: 15px;  padding-right: 15px; padding-top:10px; padding-bottom: 10px; align-items: flex-start;"];
        
        // 左边视图
        UILabel *titleView = [[UILabel alloc] init];
        titleView.text = [self.type isEqualToString:@"1"] ? @"昵称" : @"签名内容";
        [itemView addSubview:titleView style:@"display: flex; font-size: 15px; color: #333333;"];
        
        // 右边视图
        UITextField *valueView = [[UITextField alloc] init];
        valueView.placeholder = [NSString stringWithFormat:@"请输入 %@ ", [self.type isEqualToString:@"1"] ? @"昵称" : @"签名内容"];
        [itemView addSubview:valueView style:@"display: flex; flex: 1; flex-direction: row; justify-content: flex-end; align-items: center; margin-left: 10px; font-size: 15px;"];
    }
    return _contentView;
}

/// 加载数据
- (void)loadData {
    
}


@end
